package br.urca.controller;

import java.util.List;

import javax.inject.Inject;

import br.com.caelum.vraptor.Controller;
import br.com.caelum.vraptor.Result;
import br.urca.dao.CursoDAO;
import br.urca.interceptor.InterceptResource;
import br.urca.model.Curso;

@Controller
@InterceptResource
public class CursoController {

	private CursoDAO mDAO;
	private Result result;
	
	public CursoController() { }
	
	@Inject
	public CursoController(CursoDAO mDAO, Result result) {
		this.mDAO = mDAO;
		this.result = result;
	}
	
	public List<Curso> lista() {
		return this.mDAO.todos();
	}
	
}
